﻿#region File Info Header
/*________________________________________________________________________________________

  Copyright (C) 2011 Jason Zhang, eagleboost@msn.com

  * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
  * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

________________________________________________________________________________________*/
#endregion File Info Header

namespace EagleBoost.Wpf.Presentation.Controls.ColorPicker
{
  using System.Collections.Generic;
  using System.Windows.Media;

  /// <summary>
  /// StandardColors
  /// </summary>
  public class StandardColors
  {
    #region Constants
    public static readonly string NoneColor = "#00ffffff";

    public static readonly string[] ThemeBaseColors =
      new[]
        {
          "#ffffffff", "#FF000000", "#ffefefe7", "#ff18497b", "#ff4a82bd",
          "#ffc6514a", "#ff9cba5a", "#ff8465a5", "#ff4aaec6", "#fff79642",
        };

    public static readonly string[] ThemeColors =
      new []
        {
          "#fff7f3f7", "#ffdedbde", "#ffbdbebd", "#ffa5a6a5", "#ff7b7d7b",
          "#ff7b7d7e", "#ff5a595a", "#ff393c39", "#ff212421", "#ff080c08",
          "#ffdedbc6", "#ffc6be94", "#ff948a52", "#ff4a4529", "#ff181810",
          "#ffc6dbf7", "#ff8cb2e7", "#ff528ed6", "#ff10345a", "#ff082439",
          "#ffdee7f7", "#ffbdcfe7", "#ff94b2d6", "#ff316194", "#ff214163",
          "#fff7dfde", "#ffe7bab5", "#ffde9694", "#ff943431", "#ff632421",
          "#ffeff3de", "#ffd6e3bd", "#ffc6d79c", "#ff739239", "#ff4a6129",
          "#ffe7e3ef", "#ffcec3de", "#ffb5a2c6", "#ff5a497b", "#ff393052",
          "#ffdeeff7", "#ffb5dfef", "#ff94cfde", "#ff31869c", "#ff215963",
          "#ffffebde", "#ffffd7b5", "#ffffc38c", "#ffe76d08", "#ff944900",
        };

    public static readonly string[] BasicColors =
      new[]
        {
          "#ffc60000", "#ffff0000", "#ffffc300", "#ffffff00", "#ff94d352",
          "#ff00b2f7", "#ff9cba5b", "#ff0071c6", "#ff002063", "#ff7330a5",
        };
    #endregion Constants

    #region Declarations
    private static readonly List<Color> AllColorList;

    private static readonly List<Color> ThemeBaseColorList;

    private static readonly List<Color> ThemeColorList;

    private static readonly List<Color> BasicColorList;
    #endregion Declarations

    #region ctors
    static StandardColors()
    {
      ThemeBaseColorList = new List<Color>();
      foreach (var color in ThemeBaseColors)
      {
        ThemeBaseColorList.Add((Color)ColorConverter.ConvertFromString(color));
      }

      ThemeColorList = new List<Color>();
      foreach (var color in ThemeColors)
      {
        ThemeColorList.Add((Color)ColorConverter.ConvertFromString(color));
      }

      BasicColorList = new List<Color>();
      foreach (var color in BasicColors)
      {
        BasicColorList.Add((Color)ColorConverter.ConvertFromString(color));
      }

      AllColorList = new List<Color> {TransparentColor};
      AllColorList.AddRange(ThemeBaseColorList);
      AllColorList.AddRange(ThemeColorList);
      AllColorList.AddRange(BasicColorList);
    }
    #endregion ctors

    #region Public Properties
    public static Color TransparentColor
    {
      get { return Colors.Transparent; }
    }

    public static IEnumerable<Color> AvailableColors
    {
      get { return AllColorList; }
    }

    public static IEnumerable<Color> AvailableThemeBaseColors
    {
      get { return ThemeBaseColorList; }
    }

    public static IEnumerable<Color> AvailableThemeColors
    {
      get { return ThemeColorList; }
    }

    public static IEnumerable<Color> AvailableBasicColors
    {
      get { return BasicColorList; }
    }
    #endregion Public Properties
  }
}
